Custom JSP tags library present a flexible connector for the popular JQuery plugin: JQuery file tree. You can see demo for this plugin here. Here is a typical usage, displays file tree in some div block:
$(document).ready( function() { $('#container_id').fileTree({ root: '/some/folder/', script: 'myfiles.jsp', expandSpeed: 1000, collapseSpeed: 1000, multiFolder: false }, function(file) { alert(file); }); }); for getting files you have to provide a script (myfiles.jsp in this example) returns file system data in the some predefined format. This taglib lets you
create such a file. The simplest form for JSP connector is:
<%@ taglib uri="taglib.tld" prefix="s" %> <s:JQueryFileTree/> you can customize this connector. E.g. the following code hides all the directories and shows
html files only:
<%@ taglib uri="taglib.tld" prefix="s" %> <s:JQueryFileTree showDirectories="false" ext="htm,html"/> Tags are: JQueryFileTree Tag lets you implement custom connector for JQuery file tree plugin. Attributes are: 1) ext Optional attribute. Describes commas separated
list of the files extensions. Only such files will be visible. By default is empty (all files are visible).
for downloading: Library: jqfiletreetag.jar Description: taglib.tld See also Coldtags suite - the largest collection of custom JSP tags.
|
Also in Coldtags:
|